<include file="Public:header" />

<div id="page-body">
    <div id="qan-breadcrumbs"><span><a href="{$_global.site_url}">{$Think.lang.home}</a></span>&gt;&nbsp;<span>{$Think.lang.invite_friends}</span></div>
    <div id="email-container" class="container">
        <h2>{$Think.lang.invite_friend_tips}</h2>
        <form method="POST" action="{:U('Invitation/inviteFriend')}">
        	<input type="hidden" name="uid" value="{$user.user_id}" />
            <table class="tb">
                <tr>
                    <td align="right" width="15%">{$Think.lang.invite_link}:</td>
                    <td><a href="javascript:setCopy('{$user.invite_link}','{$Think.lang.copy_link_ok}');" title="{$Think.lang.copy_link}">{$user.invite_link}</a></td>
                </tr>
                <tr>
                    <td align="right">{$Think.lang.email_from}:</td>
                    <td>{$user.username}&lt;{$user.email}&gt;</td>
                </tr>
                <tr>
                    <td valign="top" align="right"><label for="recipient">{$Think.lang.email_to}:</label></td>
                    <td><input id="recipient" class="input" type="text" name="recipient" maxlength="120" size="70" /><br/>{$Think.lang.email_to_explain}</td>
                </tr>
                <eq name="captcha" value="1">
                <tr>
                    <td align="right"><label for="verify">{$Think.lang.captcha}:</label></td>
                    <td><div class="captcha-container"><input id="verify" type="text" name="verify" />&nbsp;<img class="captcha" src="{:U('Ajax/captcha')}" title="{$Think.lang.captcha_again}" onclick="reCaptcha(this);" /></div></td>
                </tr>
                </eq>
                <tr>
                	<td align="right" valign="top">{$Think.lang.message}:</td>
					<td><textarea class="textarea" name="message" rows="3" cols="80">{$Think.lang.invite_msg_default}</textarea></td>                
                </tr>
                <tr>
                    <td align="right"><span id="waiting">waiting...</span></td>
                    <td><input id="btn-submit" class="button" type="submit" value="{$Think.lang.send_invite_email}" />&nbsp;&nbsp;<input class="alt-button" type="button" value="{$Think.lang.cancel}" onclick="window.history.go(-1);" /></td>
                </tr>
            </table>
        </form>
    </div>
</div>

<include file="Public:footer" />

<script type="text/javascript">
$(function(){
	$('#btn-submit').click(function(){
		$('#waiting').show();
	});	
});
</script>